/**
 *    公共的请求方法
 */
import base from './base'
import axios from '@/utils/request'

const api = {
  /*
        1. 获取推荐音乐--、
   */
  getMusic () {
    return axios.get(base.host + base.musicUrl)
  },
  /*
      2. 获取最新音乐
   */
  getNewSong () {
    return axios.post(base.newSong, {
      params: 'njg6aytIki187DGlqedjhHu8DHsZxzidDKMm8qftvSsHwN1Jkpy2g/YGCtkWFksU',
      encSecKey: 'a60ee230d7c79919ce27cc9472e5fc7049849a509af1b73f4f06100553afc7a3642e73a74bd450cad423934fc82c53709b956c6cd21f82fd1bb485e6a4abc02e711ebb237a1ce745abe88d33cfaeca73ddfae25922cc510658bceb2082749127c50eba57f5e7e2ba0335d571839cf9f19e9fc1c8aba0afce9eff15513fd963bd'

    })
  },
  /*
    3. 热歌榜列表数据
   */
  getPlayList () {
    return axios.post(base.playlist, {
      params: 'M0oS/7DI/UWGt5AbIfoVnxDMnqPYVDHvfGz+w5KxU7igEMoucImB5OFszoe74d92',
      encSecKey: 'c7103f08201cb0cf82bc80c3e647682c9ffddffda70f612ebd8739aa5e7296a2f6a8b749a605a8e1e418a6c9fb57f2304fc8a9b52ca63a9c9466d1eb5b2db472c7509eaa3c3dd6cd847bdf9e8b7c2f1de62e4423845e17a53c7acdcfd6200748a543ce40999dd4da5363869dbcb192e325c73323c6b998f7dfdc4b58fe342314'
    })
  },
  /*
  4. 搜索热词 hotSearch
   */
  hotSearch () {
    return axios.post(base.hotSearch, {
      params: 'JnQ4jjc56ZcPqa0gf3rnkHOqJZiX/i8noal2xgDVRn4=',
      encSecKey: '2e0477ad38047d5b9394fd95150f005e5bc60b67fd588da55844aeb14526cdafd09b08e3a500e7b0307aaf4130bbeebd464c42b41855e41240e5557b3e8cbae733d60953e04284c6f7a3cac409786d7094f4f3189d1b4ad6b179945b5943a2f5ded6d8655b7d9dc787b6744bc3226bce29665c92e707ef99b66b642127c196d0'
    })
  },
  /*
  5.  搜素接口
   */
  search (params) {
    return axios.get(base.search, {
      params
    })
  },
  /*
  6. 首页-推荐-列表歌曲
  musicPlaylist
  进入推荐--列表界面的歌曲就是固定的内容 不是随id参数变化的 因为加密没有处理
   */
  musicPlaylist (params) { //
    return axios.post(base.musicPlaylist, {
      params: '+x1xyVW8IJrqZWfN3WzZZloOrR/MOSMJp8qTh99V9tZoDGZeliZg992z144+H8Yi39eXuO0QQMz5QzPhQ4WTy3XSC3pcPd35+dY7A71kEIk=',
      encSecKey: '5b922f05e9c9bad97343e4f3ccc04cc3f0fab4f1ae4ee4e82d1e86318f1e3becf0b08f19972d63b875f0fc666e45c61782a736da3e9342933d2705ffd6a01fc8a5ed19129cda5e6f177ebca00282c4c8d3ee5a130ec874f771c640cb15eb18d22aec6bbee15e4581b5ff69f0348e2e7feee58cc76a1580bd6654500624762634'
    })
  },
  /*
  7. 音乐
  id: xxx

   */
  songUrl (params) {
    return axios.post(base.songUrl, {
      params: 'eOcbn8PCzkSjd5YzaRG/0zy1bVShRT1qVIrs9e2GDJtnJiULlmT9vyrBztLixXJHkJdmrnWf2/Jjr4nIoRaX5v1MjadhtU299QY5HEEU65FVKM66+WXmSkOSLsDQtBgg',
      encSecKey: '9526e284e0cb36d01bd49b589bbbbaac37301d813954f2d0b68519b273fe9593d3da7a599bde5e431029b1b2728e4a55c632bf3a449c1ee18e558b65f8cdb29474f4d0b64a974c9f3aa4b74f1c7f0f48297abf8936f9e8741c0509f08dd164913f1b6c7560121158b6d3b1d39c5ad435ede408aa90be109bd43dd0ffa9cff774'
    })
  },

  /*、
  8. 歌词
   */
  getlyric (params) {
    return axios.get(base.lyric,{
      params
    })
  }
}

export default api




